package com.yanghui.dtracing.core.opentracing.log;

import lombok.Getter;

import java.util.Map;

@Getter
public class LogData {


    public static final String EVENT_TYPE_KEY = "event";

    public static final String CLIENT_RECV_EVENT_VALUE = "cr";

    public static final String CLIENT_SEND_EVENT_VALUE = "cs";

    public static final String SERVER_RECV_EVENT_VALUE = "sr";

    public static final String SERVER_SEND_EVENT_VALUE = "ss";

    public static final String EVENT_ERROR_VALUE = "error";

    public static final String ERROR_KIND_KEY = "error.kind";

    public static final String ERROR_OBJECT_KEY = "error.object";

    public static final String MESSAGE_KEY = "message";

    public static final String STACK_KEY = "stack";

    private final long time; // time in microseconds
    private final Map<String, ?> fields;

    public LogData(long time, Map<String, ?> fields) {
        this.time = time;
        this.fields = fields;
    }
}
